package shop;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
//import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;

@Component
//@Transactional(isolation=Isolation.SERIALIZABLE)
@Transactional
public class ListProductsService implements ListProducts{
	DBProduct  DBP;
	
	@Autowired
	public ListProductsService(DBProduct DBP){
		this.DBP = DBP;
	}
	
	//@Transactional(isolation=Isolation.SERIALIZABLE, readOnly=true)
	@Transactional
	public List<Product> listAllProduct(){
		return DBP.listAllProduct();
	}
}
